<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Catalog</title>
</head>

<body background="../img/bg.jpg"> 
	<font face="Berlin Sans FB Demi" color="#357EC7" size="3">
<?
include('auth.php');
$clasa=$_POST['clasa'];
require_once('config.php');
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {die('Failed to connect to server: ' . mysql_error());}
           
$db = mysql_select_db(DB_DATABASE);
if(!$db) {die("Unable to select database");}
$sql=mysql_query("select materie_id from clase where profesor_id='".$_SESSION['SESS_PROF']."' and nume='".$_SESSION['clasa']."'");
$result=mysql_fetch_array($sql);
$sql=mysql_query("select nume from materie where id='".$result['materie_id']."'");
$result=mysql_fetch_array($sql);
echo '<form action="clasa.php?action=add" method="post">
<select name="materie">
<option>'.$result['nume'].'</option></select>
<br>Nota:<input type="text" name="nota">
<br>Absenta:<input type="text" name="abs">
<input type="submit" value="Adauga">
</form>';


?>

   
 
 </font> 
</body>
</html>